package net.vinote.smart.platform.timer;

import java.lang.management.ManagementFactory;
import java.lang.management.MemoryPoolMXBean;
import java.util.List;

/**
 * 系统资源监控
 * 
 * @author Seer
 * @version SystemMonitorTask.java, v 0.1 2015年3月5日 下午2:48:58 Seer Exp.
 */
public class SystemMonitorTask extends AbstractSmartTimerTask {

	@Override
	public void run() {
		List<MemoryPoolMXBean> memPoolBean = ManagementFactory
				.getMemoryPoolMXBeans();
		for (MemoryPoolMXBean poolBean : memPoolBean) {
			System.out.println(poolBean.getName() + " " + poolBean.getUsage());
		}
	}
}
